home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 4 / Precision Software Applications Silver Collection Volume 4 (1993).iso / stats / chadyn.exe / YDEFINES.H < prev    next >
Text File  |  1988-11-30  |  7KB  |  232 lines

  1. /********************* YDefines.h **********************************/
  2. /* SEE YCompilr.h for:
  3.     #define INITOVLY 
  4.     #define OVERLAY 
  5.     #define overlay(x)   
  6.     #define overlay_init(x)
  7.     #define INTERRUPT   */
  8.  
  9. #define CORECOLS 960   
  10.         /* Width of the internal memory's picture =*/
  11.         /*  The number of bits wide =              */
  12.         /*   width in bits of the printer output   */
  13. #define SCRNCOLS 640   
  14.         /* Width of the crt screen.  The program   */
  15.         /*  assumes this is no bigger than CORECOLS */
  16. #define COREROWS 68   
  17.         /*  About the max num of printer lines   */
  18.                 /* that are permited in 64 K      */
  19. #define SCRNROWS 200          
  20.         /* height (bits) of crt screen    */
  21. #define CORESIZE 65280 
  22.         /* use in yplot.c; should = CORECOLS*COREROWS; it 
  23.         has to be defined separately because it is used in a 
  24.         dimension statement */
  25.  
  26. #define SELECT             15 /* used in y.c */
  27. #define  ALL_Y               210 /* used in y.c; 
  28.             needs 200 more for YY stack */
  29.  
  30. #define EQTNS0        21 /* max number of equations for main trajectory vec */
  31. #define EQUATIONS    21 /* max equations for storage vectors */
  32. #define NUM_Y  10     /* 210/21 = number of vectors in y[] */
  33.  
  34. #define YES             1
  35. #define NO            0
  36. #define KILL            0
  37. #define PICKMAP         1
  38. #define SETPARAM        2
  39. #define PROCESS            3
  40. #define ESC            27
  41.  
  42.  
  43. #define LINEFEED 10 /* used inparsing routine in YMAPS.C */
  44.  
  45. #ifdef X11
  46. /* There is no core copy in the current X11 version of the code */
  47. #define clearp()
  48. #define XK_MISCELLANY
  49. #include <X11/keysymdef.h>
  50. #define UPARROW XK_Up
  51. #define DNARROW XK_Down
  52. #define RTARROW XK_Right
  53. #define LTARROW XK_Left
  54. #define UP    XK_Up
  55. #define DOWN    XK_Down
  56. #define LEFT    XK_Left
  57. #define RIGHT    XK_Right
  58. #define F1    XK_F1
  59. #define F2    XK_F2
  60. #define F3    XK_F3
  61. #define F4    XK_F4
  62. #define F5    XK_F5
  63. #define F6    XK_F6
  64. #define F7    XK_F7
  65. #define F8    XK_F8
  66. #define F9    XK_F9
  67. #define F10    XK_F10
  68. #ifdef SUN            /* Function keys for Sun keyboards */
  69. #define End    XK_L1
  70. #define PgDn    XK_L2
  71. #define Home    XK_L3
  72. #define PgUp    XK_L4
  73. #define ALT_0    XK_L5
  74. #else                /* Hope we have enough function keys */
  75. #define End    XK_F11
  76. #define PgDn    XK_F12
  77. #define Home    XK_F13
  78. #define PgUp    XK_F14
  79. #define ALT_0    XK_F15
  80. #endif    /* SUN */
  81. #else
  82. #define UPARROW 24
  83. #define DNARROW 25
  84. #define RTARROW 16
  85. #define LTARROW 17 /* should be 27 but that doesn't work because it is ESC */
  86. #define UP    -72
  87. #define DOWN  -80
  88. #define LEFT  -75
  89. #define RIGHT -77
  90. #define End   -79
  91. #define PgDn  -81
  92. #define Home  -71
  93. #define PgUp  -73
  94. #define ALT_O -24
  95. #define F1    -59
  96. #define F2    -60
  97. #define F3    -61
  98. #define F4    -62
  99. #define F5    -63
  100. #define F6    -64
  101. #define F7    -65
  102. #define F8    -66
  103. #define F9    -67
  104. #define F10   -68
  105. /*************************************************** 
  106. Some ascii codes -- see BASIC manual appendix G 
  107.     48-57: 0,1,...,9
  108.     65-90: A,...,Z
  109.     97-122: a,...,z
  110. Notice above defined codes 71,72,73,75,77,79,80,81
  111.                 G  H  I  K  M  O  P  Q
  112. Some Extended Codes --preceeded by a character 0
  113.     120-131: Alt 1,2,...,0,-,=    
  114.     59-68:   F1-F10
  115.     84-93:   SHIFTED F1-F10
  116.     94-103   Ctrl F1-F10
  117.     104-103  Alt F1-F10
  118.     16-25 Alt Q,W,E,R,T,Y,U,I,O,P
  119.     30-38 Alt A S D F G H J K L
  120.     44-50 Alt Z X C V B N M
  121. ****************************************************/
  122. /* ASCII character codes can be found in Microsoft C Compiler manual, p. 175 */
  123. #endif    /* X11 */
  124.  
  125. #define ON     1
  126. #define OFF    0
  127.  
  128. #define CTRL_B 2
  129.  
  130. #define ESC    27
  131.  
  132. #define BIGCROSS     0
  133. #define SMALLCROSS   1
  134. #define SCRN     1    /* used to designate which cross is being drawn */
  135. #define CORE    2
  136. #define CROSSWIDTH      (corecols/120) 
  137.         /* =8   for core crosses -- see yintrpt.c and yplot.c */
  138. #define CROSSHEIGHT     ((corerows*8)/136) /* = 68/17 = 4  */
  139. #define SCRNCROSSWIDTH  (scrncols/40) /* big cross screen width */
  140. #define SCRNCROSSHEIGHT (scrnrows/25) /* big cross screen height */
  141. /* the following are used for keeping declaring vectors in YPLOT that are 
  142.         used for keeping track of colors of pixels in crosses */ 
  143. #define TWICESCRNCROSSWIDTH 64 /* ( >2*SCRNCOLS/40) big cross screen width */
  144. #define TWICESCRNCROSSHEIGHT 64/* ( > 2*SCRNROWS/25) big cross screen height */
  145. #define USTEP .001 
  146.         /* for unstable manifold computations; should 
  147.             be smaller for finer grids */
  148. #define ABS(x) ( (x)>0 ? x : -x)       /* for yplot and yintrpt and ? */
  149. /* The following are for YCases and YCases2 */
  150. #define MAX(a,b)   (a > b) ? a : b
  151. #define TEST(x) if(strcmp(CodeName,x) == 0)
  152. #define TEST2(x,y) if(strcmp(CodeName,x) == 0||strcmp(CodeName,y) == 0)
  153. #define TESTMAP(x) if(strcmp(MapName,x) == 0)
  154. #define TESTMAP2(x) if(strcmp(map,x) == 0 || strcmp(map, "all") == 0)
  155. #define SCREEN         (SCREEN_MENU || SCREEN_PROCESS)
  156. #define SCREEN_MENU     (level <=2 && coloncommand == NO && input==StInput)
  157. #define SCREEN_PROCESS  (level >= PROCESS && printer > 0 )
  158.  
  159.     /* if both conditions above are satisfied, then text is printed on the 
  160.             screen */
  161.  
  162. /* the following two are for ylyap.c for newton */                       
  163. #define  VECDIM  4   /* an upper bound on the dimension for vector in gauss */
  164. #define  MATDIM  16           /* = VECDIM*VECDIM */
  165.  
  166. /* The following are for use in Y.C */
  167. #define PLOTXY 0
  168. #define PLOTALL 2
  169. #define PLOTXX 4
  170. #define PLOTRY 6
  171. #define PLOTXR 8
  172. #define PLOTCIRC 100          
  173.  
  174. #ifndef X11
  175. /* the following are for plotting tic marks */
  176. #define    HORIZSCRN 3
  177. #define    VERTSCRN  4
  178. #define    HORIZCORE 5
  179. #define    VERTCORE  6
  180. #endif    /* X11 */
  181.  
  182. #define EPSONBW    1
  183. #define EPSONCOLOR 2
  184.  
  185. /* Additions by Eric Kostelich (mnemonics for screen sections and ScrnSec) */
  186. #define UPPERLEFT 1
  187. #define UPPERRIGHT 2
  188. #define LOWERLEFT 3
  189. #define LOWERRIGHT 4
  190. #define WHOLESCREEN 0
  191.  
  192. /* Additions by Eric Kostelich to handle input of various values */
  193. #define SETVALUE 1
  194. #define CHECKSET 0
  195.  
  196. /* Addition by Eric for defining the maximum length of an input text line */
  197. #define MAXCHAR 255
  198. #ifndef MS
  199. /* Useful extremum operators added by Eric Kostelich */
  200. #define max(x, y)  ((x) < (y) ? (y) : (x))
  201. #define min(x, y)  ((x) < (y) ? (x) : (y))
  202.  
  203. /* For blanking and plotting areas on the screen - moved from yplot.c */
  204. #define BLANK 0
  205. #define COLOR 1
  206. #endif
  207. /* For handling printers */
  208. #ifndef MS
  209. #define stdprn StPrint
  210. #endif
  211.  
  212. /* The next section is for handling math function differences on Unix
  213.  * systems */
  214.  
  215. #ifdef TESTING
  216. #ifndef UNIX
  217. #define fabs dabs    /* use the dabs() in ytools.c */
  218. #endif
  219. #endif
  220.  
  221. /* The largest integer generated by random() on Unix systems */
  222. #ifdef UNIX
  223. #define MAXRAND ((1L << 31) - 1)
  224. #define COMMANDS_DOC "commands.doc"
  225. #else
  226. #define COMMANDS_DOC "COMMANDS.DOC"
  227. #endif
  228. #ifdef X11
  229. typedef struct {int x, y;} POINT;        /* an integer point */
  230. #endif
  231. /************************* End of YDefines.h *****************************/
  232.